<template>
  <div id="top_id">
    <el-dropdown>
      <span class="el-dropdown-link">
        <i class="el-icon-user-solid"></i>
        管理员
        <i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item>
            <i class="el-icon-orange"></i>
            个人中心
        </el-dropdown-item>
        <el-dropdown-item>
            <i class="el-icon-close"></i>
            <span @click="logout">退出</span>
        </el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  methods:{
    logout(){
      localStorage.removeItem("login_data")
      this.$router.replace("/login")
    }
  }
};
</script>

<style>
</style>